package org.ef.anticheck;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;

public class AntiCheat extends Activity implements OnClickListener {

	static final String TAG = "AntiCheat";

	/** Called when the activity is first created. */
	@Override
	public void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.main);

		this.setContentView(R.layout.main);
		final View historyButton = this.findViewById(R.id.history_button);
		historyButton.setOnClickListener(this);
		final View nameListButton = this.findViewById(R.id.name_list_button);
		nameListButton.setOnClickListener(this);
		final View settingButton = this.findViewById(R.id.setting_button);
		settingButton.setOnClickListener(this);
		final View queryButton = this.findViewById(R.id.query_button);
		queryButton.setOnClickListener(this);
	}

	public void onClick(final View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.history_button:
			Log.d(TAG, "click on history button");
			final Intent i = new Intent(this, History.class);
			this.startActivity(i);
			break;

		case R.id.name_list_button:
			Log.d(TAG, "click on name list button");
			final Intent j = new Intent(this, NameList.class);
			this.startActivity(j);
			// openNewGameDialog();
			break;

		case R.id.query_button:
			Log.d(TAG, "click on query button");
			this.startActivity(new Intent(this, QueryActivity.class));
			break;

		case R.id.setting_button:
			Log.d(TAG, "click on setting button");
			// startGame(Game.DIFFICULTY_CONTINUE);
			break;
		}

	}

}